<!-- 加载 image-->
<script setup name="img-load">
const props = defineProps({
  /**
   * 路径
   */
  filePath: { type: String, default: '' },
  /**
   * 定制平台
   */
  platform: { type: Array, default: () => [] },
  /**
   * 公共主题资源
   */
  isPublic: { type: Boolean, default: true }
})
/**
 * 是否 平台定制
 */
const isCustomized = computed(() => props.platform.includes(__config._APP_ENV))
/**
 * 资源路径
 */
const path = computed(() => {
  let tempPath = ''
  // 判断是否为公共资源
  if (props.filePath?.includes('http')) {
    tempPath = `${props.filePath}`
  } else if (props.filePath) {
    tempPath = `/images/${props.filePath}`
  }
  return tempPath
})
</script>
<template>
  <img :src="path" class="img" />
</template>
<style lang="scss" scoped>
.img {
  //width: 1em;
  //height: 1em;
}
</style>
